# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=khard
pkgver=0.17.0
pkgrel=2
pkgdesc="Console CardDAV client"
url="https://github.com/scheibler/khard"
arch="noarch !x86"  # deps not available on x86
license="GPL-3.0-only"
depends="
	python3
	py3-atomicwrites
	py3-configobj
	py3-ruamel.yaml
	py3-unidecode
	py3-vobject
	"
makedepends="
	py3-setuptools
	py3-setuptools_scm
	py3-sphinx
	py3-sphinx-autoapi
	py3-sphinx-autodoc-typehints
	"
checkdepends="py3-pytest"
subpackages="$pkgname-doc"
source="https://files.pythonhosted.org/packages/source/k/khard/khard-$pkgver.tar.gz"

build() {
	python3 setup.py build
	make -C doc man
}

check() {
	pytest -v -s
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	install -Dm644 doc/build/man/$pkgname.1 "$pkgdir"/usr/share/man/man1/$pkgname.1
	install -Dm644 doc/build/man/$pkgname.conf.5 "$pkgdir"/usr/share/man/man5/$pkgname.conf.5
}

sha512sums="
9cb936aeaa327b9837488a752906bf603429ca0c7240703829220119049f5f62e84f7e4c90bb81799307fe446c3aa47fe6ee4112c276b6bb329c959be438ba25  khard-0.17.0.tar.gz
"
